﻿@model CinemaManagement.EF.Movie
@{
    ViewBag.Title = "Add";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<div class="row justify-content-center align-items-center">
    <div class="col-md-4">
        <section id="registerForm">
            @using (Html.BeginForm("Add", "Admin", new { },
                FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
            {
                @Html.AntiForgeryToken()
                <h4 class="row justify-content-center align-content-center">上架电影</h4>
                <hr />
                @Html.ValidationSummary(true)
                <div class="form-group">
                    @Html.LabelFor(m => m.movieName, "电影名称", new { @class = "control-label " })
                    <div class="col-md-8 ">
                        @Html.TextBoxFor(m => m.movieName, new { @class = "col-md-8 form-control" })
                    </div>
                    @Html.ValidationMessageFor(m => m.movieName)
                </div>
                <div class="form-group">
                    @Html.LabelFor(m => m.moviePrice, "电影价格", new { @class = "control-label " })
                    <div class="col-md-8 ">
                        @Html.TextBoxFor(m => m.moviePrice, new { @class = "col-md-8 form-control" })
                    </div>
                    @Html.ValidationMessageFor(m => m.moviePrice)
                </div>

                <div class="form-group">
                    @Html.LabelFor(m => m.movieType, "电影类型", new { @class = "control-label" })
                    <div class="col-md-8">
                        @Html.TextBoxFor(m => m.movieType, new { @class = "col-md-8 form-control" })
                    </div>
                    @Html.ValidationMessageFor(m => m.movieType)
                </div>


                <div class="form-group">
                    @Html.LabelFor(m => m.movieActor, "本片主演", new { @class = "control-label" })
                    <div class="col-md-8">
                        @Html.TextBoxFor(m => m.movieActor, new { @class = "col-md-8 form-control" })
                    </div>
                    @Html.ValidationMessageFor(m => m.movieActor)
                </div>

                <div class="form-group">
                    @Html.LabelFor(m => m.movieTime, "电影时长", new { @class = "control-label" })
                    <div class="col-md-8">
                        @Html.TextBoxFor(m => m.movieTime, new { @class = "col-md-8 form-control" })
                    </div>
                    @Html.ValidationMessageFor(m => m.movieTime)
                </div>
                <br />
                <div class="form-group text-center">
                    <input type="submit" value="确认" class="col-md-6 btn btn-outline-primary" />
                    @Html.ValidationMessage("failed")
                </div>
                <a href="@Url.Action("UserLogin", "Home",new {@class="pull-right"})">返回登录</a>
            }
        </section>
    </div>
</div>


